package cn.edu.qut.edusys.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;
@Mapper
public interface UserMapper {
    @Insert("insert into t_user_info" +
            "(userName,userPwd,userName," +
            "userSex,userEmail,userBirthday)" +
            " values(#{userName},md5(#{userPwd})," +
            "#{userName},#{userSex},#{userEmail}," +
            "#{userBirthday})")
    int save(Map<String,String> param);

    @Insert("insert into t_user_info" +
            "(userEmail,userPhone,userPwd)" +
            " values(#{userEmail},#{userPhone},md5(#{userPwd}))")
    int saveRegister(Map<String,String> param);



    List<Map<String,Object>> searchPhone(Map<String,String> param);
    List<Map<String,Object>> search(Map<String,String> param);
    int add(Map<String,String> param);
    int delete(Map<String,String> param);
    int change(Map<String,String> param);
    int changePassword(Map<String,String> param);
}
